<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=750, initial-scale=1.0">
    <title>课程表模版1</title>
    <style>
        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
            margin: 0;
            padding: 0;
        }
        *{
            box-sizing: border-box;
        }
        .container {
            width: 750px;
            background-color: #F2F2F2;
            margin: 0 auto;
            box-sizing: border-box;
            position: relative; /* Added for absolute positioning of qrcode-box */
        }
        .header {
            padding: 24px;
            height: 140px;
            background-image: 
                linear-gradient(to right, rgba(233,32,40,0.75) 60%, rgba(242,136,139,0.6) 100%),
                url('https://cdn.qiniu.kevintech.cn//business/677b9ba2b9a6a.jpg');
            background-position: center center;
            background-size: cover;
            background-repeat: no-repeat;
            position: relative;
            overflow: hidden;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .title {
            font-size: 32px;
            color: #fff;
        }
        .subtitle {
            font-size: 22px;
            color: #ebebeb;
            margin-top: 8px;
        }
        .timetable {
            border-radius: 12px;
            padding: 8px;
            
        }
       
        .cell-box{
            display: grid;
            grid-template-columns: 60px 1fr 1fr;
            gap: 16px;
            margin-top: 12px;
            background-color: #fff;
            padding: 8px 0;
        }
        .cell-header{
            display: grid;
            grid-template-columns: 60px 1fr 1fr;
            gap: 16px;
        }
       
        .timetable-header {
            font-size: 22px;
            font-weight: 600;
            color: #444;
            text-align: center;
            padding: 8px 0;
            border-radius: 8px;
        }
        .timetable-header.sw{
            background-color: #FFF5D6;
        }
        .timetable-header.xw{
            background-color: #DDEEFF;
        }
        .timetable-row {
            display: contents;
        }
        .weekday {
            text-align: center;
            font-size: 20px;
            color: #222;
            font-weight: 500;
            background: none;
            padding: 10px 8px 0;
            background-color: #fff;
            border-radius: 10px;
        }
        .cell {
            border-radius: 10px;
            display: flex;
            justify-content: flex-start;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 12px;
        }
        .cell.empty {
            color: #aaa;
            font-size: 18px;
            justify-content: center;
            align-items: center;
        }
        .course-card {
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(255, 182, 182, 0.08);
            padding: 8px 12px;
            min-width: 150px;
        }
        .course-card.private{
            background: linear-gradient(135deg, rgba(62, 90, 239, 0.85), rgba(109, 136, 249, 0.85));
            backdrop-filter: blur(6px);
        }
        .course-card.private .course-name{
            color: #fff;
        }
        .course-card.private .teacher{
            color: #fff;
        }
        .course-card.plan{
            background: linear-gradient(135deg, rgba(53, 162, 224, 0.85), rgba(94, 205, 244, 0.85));
        }
        .course-card.plan .course-name{
            color: #1A1A1A;
        }
        .course-card.plan .teacher{
            color: #1A1A1A;
        }
        .course-card.appointment{
            background: linear-gradient(135deg, rgba(255, 210, 101, 0.85), rgba(255, 192, 69, 0.85));
        }
        .course-card.appointment .course-name{
            color: #333;
        }
        .course-card.appointment .teacher{
            color: #333;    
        }
        .course-card-title{
            display: flex;
        }
        .course-type {
            font-size: 13px;
            color: #fff;
            background: #ff8fa3;
            border-radius: 4px;
            padding: 2px 8px;
            margin-right: 6px;
        }
        .course-type.private {
            background: #223CC9;
        }
        .course-type.plan{
            background: #077FD0; 
        }
        .course-type.appointment{
            background: #FFA903; 
        }
        .course-info {
            display: flex;
            align-items: center;
            margin-top: 4px;
        }
        .course-name {
            font-size: 16px;
            font-weight: 600;
            color: #313131;
        }
        .teacher {
            font-size: 14px;
            color: #666;
            margin-top: 2px;
        }
        .time {
            font-size: 13px;
            margin-top: 2px;
            color: #fff;
            padding: 2px 4px;
            border-radius: 4px;
            background-color: rgba(189, 139, 45, 0.626);
        }
        .avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #eee;
            object-fit: cover;
            margin-right: 6px;
        }
        .qrcode-box {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 10;
        }
        .qrcode-box-img{
            padding: 4px;
            border-radius: 50%;
            background: #fff;
            overflow: hidden;
        }
        .qrcode-img {
            width: 80px;
            height: 80px;
            display: block;
        }
        .qrcode-text {
            margin-top: 6px;
            font-size: 15px;
            color: #ffffff;
            text-align: center;
        }
        .tips-box {
            margin: 0 auto;
            width: 100%;
            background: #fffbe6;
            color: #ad6800;
            border: 1px solid #ffe58f;
            border-radius: 8px;
            padding: 16px;
            font-size: 18px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(255, 215, 0, 0.08);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header" style="{{header_bg_image}}">
            <div class="title">{{shop_name}}</div>
            <div class="subtitle">{{plan_date}}</div>
        </div>
        <div class="timetable">
            <div class="cell-header">
                <div></div>
                <div class="timetable-header sw">上午</div>
                <div class="timetable-header xw">下午</div>
            </div>
            {{courses}}
        </div>
        <div class="qrcode-box">
            <div class="qrcode-box-img">
                <img class="qrcode-img" src="{{mini_qrcode}}" alt="二维码" />
            </div>
            <div class="qrcode-text">扫码查看</div>
        </div>
        {{tips}}
    </div>
</body>
</html>